An Application Program Interface (API) is a set of software routines that a software application uses to request and carry out lower-level services performed by a computer's operating system. A database application, such as the MICROSOFT MONEY software application marketed by the Microsoft Corporation of Redmond, Washington, makes use of a "database API" to query and access a database, such as a financial database. For the purpose of this discussion, the database application is termed the "client application." Many such client applications make use of an Indexed Sequential Access Method (ISAM) database. The ISAM standard, known in the art, presents stored data as tables, with rows and columns representing data items and their fields. Rows can be traversed in the order in which they naturally occur, or in an order imposed by a related data structure serving as an index into a given table.
The database API provides the client application with the ability to query the ISAM database for specific records or sets of records. Many database APIs are written to conform to the Structured Query Language (SQL) or other similar language. SQL is a relational database language that consists of a set of facilities for defining, manipulating, and controlling data within a database. Querying a database using an SQL API requires passing SQL instructions to the SQL API, which are then parsed within the SQL API to form a filter. The filter is then used to identify the records in the database which satisfy the desired criteria of the query.
Unfortunately, there are several problems with the SQL language. For instance, the SQL language is text-based, which creates two related problems. First, to evaluate a SQL instruction, the SQL API must include software code to parse and lexically analyze the text instruction into a query plan that lends itself to analysis via a well-understood algorithm. The additional code to parse and lexically analyze the text instruction increases the executable size and execution time of the SQL API. Second, the text-based nature of SQL makes complex parameterized queries difficult to manipulate within the SQL API. In a SQL instruction having several conditions, passing the string from one function to another while tracking runtime parameters becomes very unwieldy.
Another problem is that the SQL language is not extensible. SQL is generally defined by an American National Standards Institute standard. Programmers cannot easily add conditions or parameters for SQL instructions without adding extra code, such as runtime libraries, to support stored procedures or custom expressions. The additional code again increases the overall executable size and may affect the performance of the SQL API.
In addition to those problems, the SQL API represents the ISAM database to the client application as tables of rows and columns. This feature makes SQL poorly suited for use with object-oriented programming languages, such as C++ and Java. Today's programmers prefer to take advantage of object-oriented programming due to its simplicity. Accordingly, a need exists for a database API which is easy to learn and which represents its underlying database as objects to the client application rather than as lower-level table rows and columns.